package dao.Impl;

import dao.OnlineDao;
import model.OnlineModel;
import util.JDBC;

public class OnlineImpl implements OnlineDao {
    @Override
    public int add(OnlineModel onlineModel) {
        String sql = "INSERT INTO `hs_online` " +
                "( `name`, `email`, `content`, `phone`)" +
                " VALUES ( '" + onlineModel.getName() + "'," +
                " '" + onlineModel.getEmail() + "'," +
                " '" + onlineModel.getContent() + "'," +
                "'" + onlineModel.getPhone() + "') ";

        return JDBC.excuteUpdate(sql);
    }
}
